﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<div class="modal-dialog x-modal-dialog" style="width: 650px; margin-top: 100px;">

  <div class="modal-content">

    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
      <h4 class="modal-title">Delegate&nbsp;-&nbsp;edit</h4>
    </div>

    <form class="form-horizontal" method="POST" action="${ctx.host}/delegates/${delegate.id}/edit" data-validate="true">

      <input type="hidden" name="_method" value="PATCH" /> 
      <input type="hidden" name="delegateId" value="${delegate.id}" />

      <div class="modal-body">

        <div class="form-group x-form-group discount-type">
          <label class="col-xs-4 control-label">NAME</label>
          <div class="col-xs-6 pull-left">
            <input type="text" class="form-control" name="name" value="${delegate.name}" placeholder="NAME" data-validate="required" />
          </div>
        </div>

        <div class="form-group x-form-group payment-type">
          <label class="col-xs-4 control-label">TELEPHONE</label>
          <div class="col-xs-6 pull-left">
            <input type="text" class="form-control" name="telephone" value="${delegate.telephone}" placeholder="TELEPHONE" data-validate="required" />
          </div>
        </div>

        <div class="form-group x-form-group payment-type">
          <label class="col-xs-4 control-label">HOTEL NAME</label>
          <div class="col-xs-6 pull-left">
            <input type="text" class="form-control" name="hotelName" value="${delegate.hotelName}" placeholder="HOTEL NAME" data-validate="required" />
          </div>
        </div>

        <div class="form-group x-form-group payment-type">
          <label class="col-xs-4 control-label">SUB-REGION</label>
          <div class="col-xs-6 pull-left">
            <input type="text" class="form-control" name="subRegion" value="${delegate.subregion}" placeholder="SUB-REGION" data-validate="required" />
          </div>
        </div>

        <div class="form-group x-form-group payment-type">
          <label class="col-xs-4 control-label">JOB TITLE</label>
          <div class="col-xs-6 pull-left">
            <input type="text" class="form-control" name="jobTitle" value="${delegate.jobTitle}" placeholder="JOB TITLE" data-validate="required" />
          </div>
        </div>

      </div>
      
      <div class="modal-footer">
        <button type="submit" class="btn btn-success btn-shadow btn-shadow-success x-btn">Commit</button>&nbsp;&nbsp;&nbsp;&nbsp;
        <button type="button" class="btn btn-default btn-shadow btn-shadow-default x-btn" data-dismiss="modal">Cancel</button>
      </div>
      
    </form>
  </div>
</div>
<script type="text/javascript">
  $('.select2').select2({
    theme : "classic",
    placeholder : '请选择',
    minimumResultsForSearch : -1,
    allowClear : true
  });
</script>